﻿<%@ Page Language="C#" MasterPageFile="~/TeamManager.Master" AutoEventWireup="true" CodeBehind="GameManagement.aspx.cs" Inherits="MonitoringServer.GameManagement" Title="Untitled Page" %>

<%@ Register Assembly="MonitoringServer" Namespace="MonitoringServer" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
  <asp:ObjectDataSource ID="GamesDataSource" runat="server" 
    DeleteMethod="DeleteGame" InsertMethod="InsertGame" SelectMethod="GetGameList" 
    TypeName="Dzzzr.Game">
    <SelectParameters>
      <asp:Parameter DefaultValue="1" Name="teamID" Type="Int32" />
    </SelectParameters>
    <InsertParameters>
      <asp:Parameter Name="teamID" Type="Int32" />
      <asp:Parameter Name="name" Type="String" />
      <asp:Parameter Name="description" Type="String" />
      <asp:Parameter Name="creationDate" Type="DateTime" />
    </InsertParameters>
  </asp:ObjectDataSource>
  <cc1:InsertableGrid ID="InsertableGrid1" runat="server" AllowInsert="True" 
    AutoGenerateColumns="False" CellPadding="4" DataKeyNames="ID" 
    DataSourceID="GamesDataSource" ForeColor="#333333" GridLines="None">
    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
    <Columns>
      <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
        ReadOnly="True" SortExpression="ID" />
      <asp:BoundField DataField="TeamID" HeaderText="TeamID" 
        SortExpression="TeamID" />
      <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
      <asp:BoundField DataField="Description" HeaderText="Description" 
        SortExpression="Description" />
      <asp:BoundField DataField="CreationDate" HeaderText="CreationDate" 
        SortExpression="CreationDate" />
      <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
    </Columns>
    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <EditRowStyle BackColor="#999999" />
    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
  </cc1:InsertableGrid>
</asp:Content>
